//SPDX-FileCopyrightText: Copyright 2022-2024 深圳市同心圆网络有限公司
//SPDX-License-Identifier: GPL-3.0-only

package fs_dao

import "go.mongodb.org/mongo-driver/mongo"

var FsInfoDao *_FsInfoDao
var FsFileDao *_FsFileDao
var GlobalFsDao *_GlobalFsDao

func InitDao(mgoDb *mongo.Database) (err error) {
	FsInfoDao, err = newFsInfoDao(mgoDb)
	if err != nil {
		return
	}
	FsFileDao, err = newFsFileDao(mgoDb)
	if err != nil {
		return
	}
	GlobalFsDao, err = newGlobalFsDao(mgoDb)
	if err != nil {
		return
	}
	return
}
